package sum;
import java.util.*;
import java.math.BigDecimal;
public class Main {

	public static void main(String[] args) {
		double a,b;
		String a1,b1;
		Scanner in = new Scanner(System.in);
		while (in.hasNextDouble())
		{
			a1=in.next();
		    b1=in.next();
		    a=Double.parseDouble(a1);
		    b=Double.parseDouble(b1);
		    System.out.println(add(a,b));
		    System.out.println(mul(a,b));	
		}
		

	}
	public static double add(double v1,double v2){
        BigDecimal b1 = new BigDecimal(Double.toString(v1));
        BigDecimal b2 = new BigDecimal(Double.toString(v2));
        return b1.add(b2).doubleValue();
    }
	public static double mul(double v1,double v2){
        BigDecimal b1 = new BigDecimal(Double.toString(v1));
        BigDecimal b2 = new BigDecimal(Double.toString(v2));
        return b1.multiply(b2).doubleValue();
    }

}
